package com.sky.sky_server.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.sky.sky_pojo.entity.DishFlavor;

@Mapper
public interface DishFlavorMapper {

    /**
     * 批量新增菜品口味
     * @param dishFlavor
     * @return
     */
    public int insertBatch(List<DishFlavor> dishFlavors);

    /**
     * 根据菜品id删除菜品口味
     * @param id
     */
    @Delete("delete from dish_flavor where dish_id = #{id}")
    public void deleteByDishId(Long id);

    /**
     * 根据菜品id列表删除菜品口味
     * @param ids
     */
    public int deleteByDishIds(List<Long> ids);

    /**
     * 根据菜品id查询菜品口味
     * @param dish_id
     * @return
     */
    @Select("select * from dish_flavor where dish_id = #{dish_id}")
    public List<DishFlavor> selectByDishId(Long dish_id);

    /**
     * 根据菜品id列表查询菜品口味
     * @param dishIds
     * @return
     */
    public List<DishFlavor> selectByDishIds(List<Long> dishIds);
    
}
